<%--
  Created by IntelliJ IDEA.
  User: song
  Date: 2021/10/25
  Time: 7:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>新用户注册</title>
</head>
<script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
<script type="text/javascript">
    $(function (){
        $("#userId").blur(function(){
            var uername = $(this).val();
            $.post("/submit","username=" + uername,function (userSpanId){
                $("#userSpanId").html(userSpanId);
            })
        })
    })
</script>
<body>
    <h1>新用户注册</h1>
    <form action="register" method="post" >
        用户名:<input type="text" id="userId" name="username" placeholder="请输入用户名"><span id="userSpanId"></span><br>
        密码:<input type="password" id="password" name="password" placeholder="请输入密码"><br>
        <input type="submit" value="确认注册">
    </form>
    <form action="upload" method="post" enctype="multipart/form-data">
        照片:<input type="file" name="picture" >
        <input type="submit" value="上传">
    </form>

</body>
</html>
